跳到主要内容

GetFooter

Returns the content for the specified footer type.

Syntax

expression.GetFooter(sType, isCreate);

expression - A variable that represents a ApiSection class.

Parameters

NameRequired/OptionalData typeDefaultDescription
sTypeRequiredHdrFtrTypeFooter type to get the content from.
isCreateOptionalbooleanfalseSpecifies whether to create a new footer or not with the specified footer type in case no footer with such a type could be found in the current section.

Returns

ApiDocumentContent

Example

This example shows how to get the content for the specified footer type.

let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
paragraph.AddText("This is a page with a footer. ");
paragraph.AddText("Scroll down the page to see it.");
let section = doc.GetFinalSection();
let footer = section.GetFooter("default", true);
paragraph = footer.GetElement(0);
paragraph.AddText("This is a page footer");